﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using NPOI.HSSF.UserModel;
using NPOI.HPSF;
using System.IO;

namespace Itop.YHPC.search
{
    public class Export
    {
       /* HSSFWorkbook hssfworkbook = null;
        public void FillData()
        {
            FileStream fs = new FileStream(Server.MapPath(@"\Template\A.xls"), FileMode.Open, FileAccess.Read);
            HSSFWorkbook templateWorkbook = new HSSFWorkbook(fs, true);
            HSSFSheet sheet = templateWorkbook.GetSheet("一般隐患1").CloneSheet(templateWorkbook);
            templateWorkbook.SetSheetName(0, "1");
            templateWorkbook.SetSheetName(1, "2");
            FileStream file = new FileStream(@"C:/test.xls", FileMode.Create);
            hssfworkbook.Write(file);
            file.Close();
        }


        public void InitializeWorkbook()
        {
            hssfworkbook = new HSSFWorkbook();

            ////create a entry of DocumentSummaryInformation
            DocumentSummaryInformation dsi = PropertySetFactory.CreateDocumentSummaryInformation();
            dsi.Company = "隐患文档";
            hssfworkbook.DocumentSummaryInformation = dsi;

            ////create a entry of SummaryInformation
            SummaryInformation si = PropertySetFactory.CreateSummaryInformation();
            si.Subject = "隐患文档";
            hssfworkbook.SummaryInformation = si;
        }*/
    }
}
